/*
    Superjuego Engine
    Copyright (C) 2011 Jorge Luís Cabral y Gabriel Ernesto Cabral

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    Contact: baigosoft@hotmail.com
*/

#ifndef AUDIO_H_
#define AUDIO_H_



#include <stdlib.h>
#include <string.h>


/*WARNING: platform dependant*/
#ifdef DREAMCAST
#include "kos.h"
#include "oggvorbis/sndoggvorbis.h"
#define SE_music char
#define SE_sound sfxhnd_t
#else
#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>
#define SE_music Mix_Music
#define SE_sound Mix_Chunk
#endif




//int soundEnabled;
//int musicEnabled;
//int musicPlaying;

/*initialization related functions*/
void SE_audio_init(int rate, int bits, int stereo);
void SE_audio_close();
void SE_audio_enablesound();
void SE_audio_disablesound();
void SE_audio_enablemusic();
void SE_audio_disablemusic();

/*music related functions*/
SE_music *SE_audio_loadmusic(char *filename);
void SE_audio_playmusic(SE_music *musicid);
void SE_audio_stopmusic();
void SE_audio_setmusicvolume(int volume);
int SE_audio_isplayingmusic();

/*sound effects related functions*/
SE_sound *SE_audio_loadsound(char *filename);
void SE_audio_playsound(SE_sound *soundid);
void SE_audio_setsoundvolume(int volume);


#endif
